\documentclass[9pt]{article}
\usepackage{amsmath}
\begin{document}
Read in the following dictionary:
\[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{8}   &  4.0 & +  2.00 x_{1} & -5.00 x_{2} & +  8.00 x_{3} & -5.00 x_{4} & +  6.00 x_{5} & -5.00 x_{6} & +  2.00 x_{7}\\
 x_{9}   &  -6.0 & -7.00 x_{1} & +  3.00 x_{2} & -10.00 x_{3} & +  2.00 x_{4} & +  6.00 x_{5} & -6.00 x_{6} &   \\
 x_{10}   &  51.0 & -10.00 x_{1} & -1.00 x_{2} & + 10.00 x_{3} & -1.00 x_{4} & -8.00 x_{5} &   & -10.00 x_{7}\\
 x_{11}   &  21.0 & +  9.00 x_{1} & -7.00 x_{2} & -3.00 x_{3} & -4.00 x_{4} &   & -3.00 x_{6} & -3.00 x_{7}\\
 x_{12}   &  7.0 & +  2.00 x_{1} & +  4.00 x_{2} &   & +  4.00 x_{4} & + 10.00 x_{5} & -9.00 x_{6} & -10.00 x_{7}\\
\hline
z    &  0.0 & -2.00 x_{1} & +  4.00 x_{2} & +  4.00 x_{3} & -2.00 x_{4} & +  3.00 x_{5} & -5.00 x_{6} & -1.00 x_{7}\\
\end{array}\]
\subsection{Initialization Phase: Dual Problem Solving}
New Objective in primal was changed to : \[ \max\ \sum_{j=1}^{7}\ - x_j \] 
Primal variable $x_j$ corresponds to dual variable $y_j$ for $j = 1,\ldots,12$
Dual Dictionary (with objective changed is): 
\[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 y_{1}   &  1.0 & -2.00 y_{8} & +  7.00 y_{9} & + 10.00 y_{10} & -9.00 y_{11} & -2.00 y_{12}\\
 y_{2}   &  1.0 & +  5.00 y_{8} & -3.00 y_{9} & +  1.00 y_{10} & +  7.00 y_{11} & -4.00 y_{12}\\
 y_{3}   &  1.0 & -8.00 y_{8} & + 10.00 y_{9} & -10.00 y_{10} & +  3.00 y_{11} &   \\
 y_{4}   &  1.0 & +  5.00 y_{8} & -2.00 y_{9} & +  1.00 y_{10} & +  4.00 y_{11} & -4.00 y_{12}\\
 y_{5}   &  1.0 & -6.00 y_{8} & -6.00 y_{9} & +  8.00 y_{10} &   & -10.00 y_{12}\\
 y_{6}   &  1.0 & +  5.00 y_{8} & +  6.00 y_{9} &   & +  3.00 y_{11} & +  9.00 y_{12}\\
 y_{7}   &  1.0 & -2.00 y_{8} &   & + 10.00 y_{10} & +  3.00 y_{11} & + 10.00 y_{12}\\
\hline
z    &  -0 & -4.00 y_{8} & +  6.00 y_{9} & -51.00 y_{10} & -21.00 y_{11} & -7.00 y_{12}\\
\end{array}\]
Initialization succeeded in finding final dual dictionary with 2 pivots
\[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 y_{1}   &  2.16666666667 & -9.00 y_{8} & -1.17 y_{5} & + 19.33 y_{10} & -9.00 y_{11} & -13.67 y_{12}\\
 y_{2}   &  0.5 & +  8.00 y_{8} & +  0.50 y_{5} & -3.00 y_{10} & +  7.00 y_{11} & +  1.00 y_{12}\\
 y_{3}   &  2.66666666667 & -18.00 y_{8} & -1.67 y_{5} & +  3.33 y_{10} & +  3.00 y_{11} & -16.67 y_{12}\\
 y_{4}   &  0.666666666667 & +  7.00 y_{8} & +  0.33 y_{5} & -1.67 y_{10} & +  4.00 y_{11} & -0.67 y_{12}\\
 y_{9}   &  0.166666666667 & -1.00 y_{8} & -0.17 y_{5} & +  1.33 y_{10} &   & -1.67 y_{12}\\
 y_{6}   &  2.0 & -1.00 y_{8} & -1.00 y_{5} & +  8.00 y_{10} & +  3.00 y_{11} & -1.00 y_{12}\\
 y_{7}   &  1.0 & -2.00 y_{8} &   & + 10.00 y_{10} & +  3.00 y_{11} & + 10.00 y_{12}\\
\hline
z    &  1.0 & -10.00 y_{8} & -1.00 y_{5} & -43.00 y_{10} & -21.00 y_{11} & -17.00 y_{12}\\
\end{array}\]
Primal Dictionary is:
\[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{8}   &  10.0 & +  9.00 x_{1} & -8.00 x_{2} & + 18.00 x_{3} & -7.00 x_{4} & +  1.00 x_{9} & +  1.00 x_{6} & +  2.00 x_{7}\\
 x_{5}   &  1.0 & +  1.17 x_{1} & -0.50 x_{2} & +  1.67 x_{3} & -0.33 x_{4} & +  0.17 x_{9} & +  1.00 x_{6} &   \\
 x_{10}   &  43.0 & -19.33 x_{1} & +  3.00 x_{2} & -3.33 x_{3} & +  1.67 x_{4} & -1.33 x_{9} & -8.00 x_{6} & -10.00 x_{7}\\
 x_{11}   &  21.0 & +  9.00 x_{1} & -7.00 x_{2} & -3.00 x_{3} & -4.00 x_{4} &   & -3.00 x_{6} & -3.00 x_{7}\\
 x_{12}   &  17.0 & + 13.67 x_{1} & -1.00 x_{2} & + 16.67 x_{3} & +  0.67 x_{4} & +  1.67 x_{9} & +  1.00 x_{6} & -10.00 x_{7}\\
\hline
z    &  -1.0 & -2.17 x_{1} & -0.50 x_{2} & -2.67 x_{3} & -0.67 x_{4} & -0.17 x_{9} & -2.00 x_{6} & -1.00 x_{7}\\
\end{array}\]
Primal Dictionary with original objective is:
\[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{8}   &  10.0 & +  9.00 x_{1} & -8.00 x_{2} & + 18.00 x_{3} & -7.00 x_{4} & +  1.00 x_{9} & +  1.00 x_{6} & +  2.00 x_{7}\\
 x_{5}   &  1.0 & +  1.17 x_{1} & -0.50 x_{2} & +  1.67 x_{3} & -0.33 x_{4} & +  0.17 x_{9} & +  1.00 x_{6} &   \\
 x_{10}   &  43.0 & -19.33 x_{1} & +  3.00 x_{2} & -3.33 x_{3} & +  1.67 x_{4} & -1.33 x_{9} & -8.00 x_{6} & -10.00 x_{7}\\
 x_{11}   &  21.0 & +  9.00 x_{1} & -7.00 x_{2} & -3.00 x_{3} & -4.00 x_{4} &   & -3.00 x_{6} & -3.00 x_{7}\\
 x_{12}   &  17.0 & + 13.67 x_{1} & -1.00 x_{2} & + 16.67 x_{3} & +  0.67 x_{4} & +  1.67 x_{9} & +  1.00 x_{6} & -10.00 x_{7}\\
\hline
z    &  3.0 & +  1.50 x_{1} & +  2.50 x_{2} & +  9.00 x_{3} & -3.00 x_{4} & +  0.50 x_{9} & -2.00 x_{6} & -1.00 x_{7}\\
\end{array}\]
\section{Optimization Phase Simplex}
Starting Dictionary is:
\[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{8}   &  10.0 & +  9.00 x_{1} & -8.00 x_{2} & + 18.00 x_{3} & -7.00 x_{4} & +  1.00 x_{9} & +  1.00 x_{6} & +  2.00 x_{7}\\
 x_{5}   &  1.0 & +  1.17 x_{1} & -0.50 x_{2} & +  1.67 x_{3} & -0.33 x_{4} & +  0.17 x_{9} & +  1.00 x_{6} &   \\
 x_{10}   &  43.0 & -19.33 x_{1} & +  3.00 x_{2} & -3.33 x_{3} & +  1.67 x_{4} & -1.33 x_{9} & -8.00 x_{6} & -10.00 x_{7}\\
 x_{11}   &  21.0 & +  9.00 x_{1} & -7.00 x_{2} & -3.00 x_{3} & -4.00 x_{4} &   & -3.00 x_{6} & -3.00 x_{7}\\
 x_{12}   &  17.0 & + 13.67 x_{1} & -1.00 x_{2} & + 16.67 x_{3} & +  0.67 x_{4} & +  1.67 x_{9} & +  1.00 x_{6} & -10.00 x_{7}\\
\hline
z    &  3.0 & +  1.50 x_{1} & +  2.50 x_{2} & +  9.00 x_{3} & -3.00 x_{4} & +  0.50 x_{9} & -2.00 x_{6} & -1.00 x_{7}\\
\end{array}\]


 $ x_{1} $ enters and $ x_{10} $ leaves 

 \[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{8}   &  30.0172413793 & -0.47 x_{10} & -6.60 x_{2} & + 16.45 x_{3} & -6.22 x_{4} & +  0.38 x_{9} & -2.72 x_{6} & -2.66 x_{7}\\
 x_{5}   &  3.59482758621 & -0.06 x_{10} & -0.32 x_{2} & +  1.47 x_{3} & -0.23 x_{4} & +  0.09 x_{9} & +  0.52 x_{6} & -0.60 x_{7}\\
 x_{1}   &  2.22413793103 & -0.05 x_{10} & +  0.16 x_{2} & -0.17 x_{3} & +  0.09 x_{4} & -0.07 x_{9} & -0.41 x_{6} & -0.52 x_{7}\\
 x_{11}   &  41.0172413793 & -0.47 x_{10} & -5.60 x_{2} & -4.55 x_{3} & -3.22 x_{4} & -0.62 x_{9} & -6.72 x_{6} & -7.66 x_{7}\\
 x_{12}   &  47.3965517241 & -0.71 x_{10} & +  1.12 x_{2} & + 14.31 x_{3} & +  1.84 x_{4} & +  0.72 x_{9} & -4.66 x_{6} & -17.07 x_{7}\\
\hline
z    &  6.33620689655 & -0.08 x_{10} & +  2.73 x_{2} & +  8.74 x_{3} & -2.87 x_{4} & +  0.40 x_{9} & -2.62 x_{6} & -1.78 x_{7}\\
\end{array}\]


 $ x_{2} $ enters and $ x_{8} $ leaves 

 \[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{2}   &  4.54569190601 & -0.07 x_{10} & -0.15 x_{8} & +  2.49 x_{3} & -0.94 x_{4} & +  0.06 x_{9} & -0.41 x_{6} & -0.40 x_{7}\\
 x_{5}   &  2.14490861619 & -0.04 x_{10} & +  0.05 x_{8} & +  0.67 x_{3} & +  0.07 x_{4} & +  0.07 x_{9} & +  0.65 x_{6} & -0.48 x_{7}\\
 x_{1}   &  2.92950391645 & -0.06 x_{10} & -0.02 x_{8} & +  0.21 x_{3} & -0.06 x_{4} & -0.06 x_{9} & -0.48 x_{6} & -0.58 x_{7}\\
 x_{11}   &  15.545691906 & -0.07 x_{10} & +  0.85 x_{8} & -18.51 x_{3} & +  2.06 x_{4} & -0.94 x_{9} & -4.41 x_{6} & -5.40 x_{7}\\
 x_{12}   &  52.4908616188 & -0.79 x_{10} & -0.17 x_{8} & + 17.10 x_{3} & +  0.79 x_{4} & +  0.79 x_{9} & -5.12 x_{6} & -17.52 x_{7}\\
\hline
z    &  18.7584856397 & -0.27 x_{10} & -0.41 x_{8} & + 15.55 x_{3} & -5.45 x_{4} & +  0.55 x_{9} & -3.75 x_{6} & -2.87 x_{7}\\
\end{array}\]


 $ x_{3} $ enters and $ x_{11} $ leaves 

 \[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{2}   &  6.63774862463 & -0.08 x_{10} & -0.04 x_{8} & -0.13 x_{11} & -0.67 x_{4} & -0.07 x_{9} & -1.01 x_{6} & -1.13 x_{7}\\
 x_{5}   &  2.70849202991 & -0.04 x_{10} & +  0.08 x_{8} & -0.04 x_{11} & +  0.14 x_{4} & +  0.03 x_{9} & +  0.49 x_{6} & -0.67 x_{7}\\
 x_{1}   &  3.10932430526 & -0.06 x_{10} & -0.01 x_{8} & -0.01 x_{11} & -0.04 x_{4} & -0.07 x_{9} & -0.53 x_{6} & -0.64 x_{7}\\
 x_{3}   &  0.839892791649 & -0.00 x_{10} & +  0.05 x_{8} & -0.05 x_{11} & +  0.11 x_{4} & -0.05 x_{9} & -0.24 x_{6} & -0.29 x_{7}\\
 x_{12}   &  66.8545634081 & -0.85 x_{10} & +  0.61 x_{8} & -0.92 x_{11} & +  2.69 x_{4} & -0.08 x_{9} & -9.19 x_{6} & -22.51 x_{7}\\
\hline
z    &  31.8173931443 & -0.33 x_{10} & +  0.30 x_{8} & -0.84 x_{11} & -3.72 x_{4} & -0.24 x_{9} & -7.45 x_{6} & -7.41 x_{7}\\
\end{array}\]


 $ x_{8} $ enters and $ x_{2} $ leaves 

 \[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{8}   &  178.238636364 & -2.15 x_{10} & -26.85 x_{2} & -3.61 x_{11} & -17.87 x_{4} & -1.86 x_{9} & -27.02 x_{6} & -30.32 x_{7}\\
 x_{5}   &  16.8011363636 & -0.21 x_{10} & -2.12 x_{2} & -0.32 x_{11} & -1.27 x_{4} & -0.11 x_{9} & -1.65 x_{6} & -3.07 x_{7}\\
 x_{1}   &  0.670454545455 & -0.03 x_{10} & +  0.37 x_{2} & +  0.04 x_{11} & +  0.21 x_{4} & -0.05 x_{9} & -0.16 x_{6} & -0.23 x_{7}\\
 x_{3}   &  9.01136363636 & -0.10 x_{10} & -1.23 x_{2} & -0.22 x_{11} & -0.71 x_{4} & -0.14 x_{9} & -1.48 x_{6} & -1.68 x_{7}\\
 x_{12}   &  176.352272727 & -2.17 x_{10} & -16.50 x_{2} & -3.14 x_{11} & -8.29 x_{4} & -1.23 x_{9} & -25.80 x_{6} & -41.14 x_{7}\\
\hline
z    &  85.1079545455 & -0.97 x_{10} & -8.03 x_{2} & -1.92 x_{11} & -9.06 x_{4} & -0.80 x_{9} & -15.53 x_{6} & -16.48 x_{7}\\
\end{array}\]
Final Dictionary
Solution:  85.1079545455
Num Pivots:  5
\end{document}
